home *** CD-ROM | disk | FTP | other *** search
/ Interactive Media Design Review 1999 / Interactive Media Design Review 1999.iso / pc / allfiles / angry / main.dir / 00009_Script_dropz < prev    next >
Text File  |  1999-03-01  |  2KB  |  81 lines

  1. property pSpr
  2. property pFadeCount
  3. property pActiveDrop
  4. property pYOffset, pOrigLoc, pYLoc, pNum, pActive
  5.  
  6. global bgSpr
  7.  
  8. on new me, thisSpr
  9.   
  10.   set pSpr = thisSpr
  11.   set pFadeCount = 20
  12.   set pNum = the memberNum of sprite(pSpr)
  13.   set pActive = TRUE
  14.   puppetSprite pSpr, TRUE
  15.   
  16.   set pYLoc = the locV of sprite(pSpr)
  17.   
  18.   
  19.   set pYOffset = the locV of sprite(bgSpr) - the locV of sprite(pSpr)
  20.   
  21.   set pOrigLoc = the loc of sprite(bgSpr) - the loc of sprite(pSpr)
  22.   
  23.   
  24.   
  25.   return me
  26. end
  27.  
  28.  
  29. on drop me, underThis
  30.   
  31.   set the loc of sprite(pSpr) to the loc of sprite(underThis)
  32.   if random(3) = 2 then
  33.     set the member of sprite(pSpr) to member "drop02"
  34.     set pFadeCount = 10
  35.   else
  36.     set the member of sprite(pSpr) to member "drop01"
  37.   end if
  38.   
  39.   set pActiveDrop = TRUE
  40.   
  41. end
  42.  
  43.  
  44. on check me
  45.   
  46.   if pActiveDrop then set pFadeCount = pFadeCount - 1
  47.   if pFadeCount = 0 then
  48.     set the locH of sprite(pSpr) to 1000
  49.     set pFadeCount = 20
  50.     set the blend of sprite(pSpr) to 100
  51.     set pActiveDrop = FALSE
  52.     
  53.   else if pFadeCount = 10 then
  54.     
  55.     if the member of sprite(pSpr) = member "drop01" then
  56.       set the member of sprite(pSpr) = member "drop02"
  57.     end if
  58.     
  59.   else if pFadeCount = 5 then
  60.     set the blend of sprite(pSpr) to 80
  61.   else if pFadeCount = 3 then
  62.     set the blend of sprite(pSpr) to 50
  63.   end if
  64.   
  65. end
  66.  
  67. on scrollDrops me, thisDir, thisSpeed
  68.   
  69.   
  70.   set pYloc = 1000
  71.   set pActive = FALSE
  72.   
  73.   if the locV of sprite(pSpr) <> pYLoc then 
  74.     set the locV of sprite(pSpr) = pYLoc
  75.   end if
  76.   
  77.   
  78.   
  79.   
  80. end
  81.